package net.maku.im.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fhs.core.trans.anno.Trans;
import com.fhs.core.trans.constant.TransType;
import com.fhs.core.trans.vo.TransPojo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import net.maku.framework.common.utils.DateUtils;
import net.maku.im.constant.ImConstant;
import net.maku.im.entity.ImUserEntity;

import java.io.Serializable;
import java.util.Date;

/**
* IM群
*
* @author Blue 
* @since 1.0.0 2024-07-14
*/
@Data
@Schema(description = "IM群")
public class ImGroupVO implements Serializable, TransPojo {
	private static final long serialVersionUID = 1L;

	@Schema(description = "id")
	private Long id;

	@Schema(description = "群名字")
	private String name;

	@Trans(type = TransType.SIMPLE,dataSource = ImConstant.DS_IM_PLATFORM,target = ImUserEntity.class, fields = "userName", ref = "ownerUserName")
	@Schema(description = "群主id")
	private Long ownerId;

	@Schema(description = "群主用户名")
	private String ownerUserName;

	@Schema(description = "群头像")
	private String headImage;

	@Schema(description = "群头像缩略图")
	private String headImageThumb;

	@Schema(description = "群公告")
	private String notice;

	@Schema(description = "是否被封禁")
	private Boolean isBanned;

	@Schema(description = "被封禁原因")
	private String reason;

	@Schema(description = "创建时间")
	@JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
	private Date createdTime;

	@Schema(description = "成员数量")
	private Long memberCount;


}